<!doctype html>
<html lang="zh-cmn-Hans-CN"> <!--遵循BCP47文档, 声明语言为大陆简中普通话-->
<head>
    <meta charset="UTF-8">
    <!--Let browser know website is optimized for mobile-->
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="icon" href="/media/head/favicon.ico" type="image/x-icon">
    <!--Import Google Icon Font-->
    <link href="/static/fonts/Material%20Icons.css" rel="stylesheet">
    <link href="/static/fonts/Roboto.css" rel="stylesheet">
    <!--Import materialize.css-->
    <link type="text/css" href="/static/css/materialize.min.css" rel="stylesheet" media="screen, projection">
    <!--Import Other CSS-->
    {% block css %}
    {% endblock %}
    <!--Import Customized CSS-->
    <link type="text/css" href="/static/css/style.css" rel="stylesheet">
    <title>你的网站名</title>
</head>
<body>
    <header>
        <div class="navbar-fixed">
            <nav>
                <div class="nav-wrapper blue">
                    <a href="" data-target="mobile-sidenav" class="sidenav-trigger"><i class="material-icons">menu</i></a>
                    <div class="container">
                        <a href="/" class="brand-logo">码客笔记</a>
                        <ul class="right hide-on-med-and-down">
                            <li><a href="/"><i class="material-icons left">home</i>主页</a></li>
                            <li><a href="/archive/"><i class="material-icons left">archive</i>归档</a></li>
                            <li><a href="/books/"><i class="material-icons left">book</i>读书专栏</a></li>
                            <li><a href="/about/"><i class="material-icons left">info</i>关于</a></li>
                        </ul>
                    </div>
                </div>
            </nav>
        </div>

        <ul class="sidenav" id="mobile-sidenav">
            <li><a class="waves-effect waves-light" href="/"><i class="material-icons left">home</i>主页</a></li>
            <li><a class="waves-effect waves-light" href="/archive/"><i class="material-icons left">archive</i>归档</a></li>
            <li><a class="waves-effect waves-light" href="/books/"><i class="material-icons left">book</i>读书专栏</a></li>
            <li><a class="waves-effect waves-light" href="/about/"><i class="material-icons left">info</i>关于</a></li>
            <li><a class="waves-effect waves-light" href="/admin_login/"><i class="material-icons left">person</i>管理员登录</a></li>
            {% if request.user.is_authenticated %}
            <li><a class="waves-effect waves-light" href="/add_article/"><i class="material-icons left">publish</i>发布文章</a></li>
            <li><a class="waves-effect waves-light" href="/add_image/"><i class="material-icons left">cloud_upload</i>上传图片</a></li>
            <li><a class="waves-effect waves-light" href="/images/"><i class="material-icons left">photo_library</i>在线图库</a></li>
            <li><a class="waves-effect waves-light" href="javascript:void(0)"  id="logout-mobile"><i class="material-icons left">exit_to_app</i>注销登录</a></li>
            {% endif %}
        </ul>
    </header>
    <main>
    {% block main %}
    {% endblock %}
        {% if not request.user.is_authenticated %}
        <div class="fixed-action-btn">
            <a class="btn-floating btn-large waves-effect waves-light red tooltipped" data-position="left" data-tooltip="回到顶部" id="to-top">
                <i class="large material-icons">keyboard_arrow_up</i>
            </a>
        </div>
        {% endif %}
        {% if request.user.is_authenticated %}
        <div class="fixed-action-btn" id="admin-mode">
            <a class="btn-floating btn-large waves-effect waves-light red" id="admin-menu">
                <i class="large material-icons">menu</i>
            </a>
            <ul>
                <li>
                    <a class="btn-floating waves-effect waves-light red tooltipped" data-position="left" data-tooltip="注销登录" href="javascript:void(0)" id="logout">
                        <i class="material-icons">exit_to_app</i>
                    </a>
                </li>
                <li>
                    <a class="btn-floating waves-effect waves-light yellow tooltipped" data-position="left" data-tooltip="在线图库" href="/images/">
                        <i class="material-icons">photo_library</i>
                    </a>
                </li>
                <li>
                    <a class="btn-floating waves-effect waves-light green tooltipped" data-position="left" data-tooltip="发布文章" href="/add_article/">
                        <i class="material-icons">publish</i>
                    </a>
                </li>
                <li>
                    <a class="btn-floating waves-effect waves-light blue tooltipped" data-position="left" data-tooltip="上传图片" href="/add_image/">
                        <i class="material-icons">cloud_upload</i>
                    </a>
                </li>
                <li>
                    <a class="btn-floating waves-effect waves-light teal tooltipped" data-position="left" data-tooltip="回到顶部" id="to-top">
                        <i class="material-icons">keyboard_arrow_up</i>
                    </a>
                </li>
            </ul>
        </div>
        {% endif %}
    </main>
    <footer class="page-footer blue">
        <div class="container">
            <div class="row">
                <div class="col l4 offset-l2 s6 hide-on-small-and-down">
                    <h5 class="white-text">依赖项目</h5>
                    <ul>
                        <li><a class="grey-text text-lighten-3" href="https://www.djangoproject.com/" target="_blank" rel="noopener norefferrer">Python Django</a></li>
                        <li><a class="grey-text text-lighten-3" href="http://www.fontawesome.com.cn/" target="_blank" rel="noopener norefferrer">FontAwesome</a></li>
                        <li><a class="grey-text text-lighten-3" href="https://materializecss.com/" target="_blank" rel="noopener norefferrer">Materialize</a></li>
                        <li><a class="grey-text text-lighten-3" href="https://pandao.github.io/editor.md/" target="_blank" rel="noopener norefferrer">Editor.md</a></li>
                        <li><a class="grey-text text-lighten-3" href="https://jquery.com/" target="_blank" rel="noopener norefferrer">jQuery</a></li>
                    </ul>
                </div>
                <div class="col l4 offset-l2 s6">
                    <h5 class="white-text">相关链接</h5>
                    <ul>
                        <li><a class="grey-text text-lighten-3" href="https://mark-thinkpad.github.io/" target="_blank" rel="noopener norefferrer">博客备站(Hexo搭建)</a></li>
                        <li><a class="grey-text text-lighten-3" href="https://github.com/Mark-ThinkPad/newbie_blog" target="_blank" rel="noopener norefferrer">项目地址(GitHub)</a></li>
                        <li><a class="grey-text text-lighten-3" href="https://gitee.com/Mark-ThinkPad/newbie_blog" target="_blank" rel="noopener norefferrer">项目地址(Gitee)</a></li>
                        <li><a class="grey-text text-lighten-3" href="https://music.163.com/#/user/home?id=35189854" target="_blank" rel="noopener norefferrer">网易云音乐</a></li>
                        <li><a class="grey-text text-lighten-3" href="mailto:1372469698@qq.com">QQ邮箱</a></li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="footer-copyright">
            <div class="container center">
                © <span id="footer-year">2019</span> 你的网站名 |
                <a class="grey-text text-lighten-4" href="http://www.miitbeian.gov.cn/" target="_blank" rel="noopener norefferrer">你的网站备案号</a>
            </div>
        </div>
    </footer>

    <!--JavaScript at end of body for optimized loading-->
    <script type="text/javascript" src="/static/js/jquery-3.4.1.min.js" charset="UTF-8"></script>
    <script type="text/javascript" src="/static/js/materialize.min.js" charset="UTF-8"></script>
    <script type="text/javascript" src="/static/js/common.js" charset="UTF-8"></script>
    {% block js %}
    {% endblock %}
</body>
</html>